{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "URL: http://bokeh.pydata.org/en/latest/docs/gallery/step_chart.html\n",
    "\n",
    "Most examples work across multiple plotting backends, this example is also available for:\n",
    "\n",
    "* [Bokeh - step_chart example](../bokeh/step_chart.ipynb)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import holoviews as hv\n",
    "from holoviews import opts\n",
    "\n",
    "hv.extension('matplotlib')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Declare data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# build a dataset where multiple columns measure the same thing\n",
    "stamp    = [.33, .33, .34, .37, .37, .37, .37, .39, .41, .42,\n",
    "            .44, .44, .44, .45, .46, .49, .49]\n",
    "postcard = [.20, .20, .21, .23, .23, .23, .23, .24, .26, .27,\n",
    "            .28, .28, .29, .32, .33, .34, .35]\n",
    "\n",
    "group = \"U.S. Postage Rates (1999-2015)\"\n",
    "stamp    = hv.Curve(stamp, vdims='Rate per ounce', label='stamp', group=group)\n",
    "postcard = hv.Curve(postcard, vdims='Rate per ounce', label='postcard', group=group)\n",
    "postage = (stamp * postcard)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "postage.opts(\n",
    "    opts.Curve(interpolation='steps-mid', linestyle=hv.Cycle(values=['--', '-'])),\n",
    "    opts.Overlay(legend_position='top_left'))"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
